package com.wkbb.basic.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.wkbb.common.enums.UserTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author Alger Yang
 * @title: TeacherManageVo
 * @projectName wkbb-3.0
 * @description: 后台老师管理列表视图对象
 * @date 2019/7/29 002914:31
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class TeacherManageVo {

    @ApiModelProperty(value = "编号")
    private Long id;

    @ApiModelProperty(value = "组织编号")
    private Long orgId;

    @ApiModelProperty(value = "头像Url")
    private String headImgUrl;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "1园长 2教师 3保育员 4 营养师 5代课教师 6其他")
    private Short userType;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "性别 ")
    private String sex;

    @ApiModelProperty(value = "身份证号")
    private String idcard;

    @ApiModelProperty(value = "教工号")
    private String jobNo;

    @ApiModelProperty(value = "岗位ID")
    private Long positionId;

    @ApiModelProperty(value = "职务名称")
    private String positionName;

    @ApiModelProperty(value = "省份CODE")
    private String provinceCode;

    @ApiModelProperty(value = "省份")
    private String province;

    @ApiModelProperty(value = "城市CODE")
    private String cityCode;

    @ApiModelProperty(value = "城市")
    private String city;

    @ApiModelProperty(value = "区镇CODE")
    private String areaCode;

    @ApiModelProperty(value = "区镇")
    private String area;

    @ApiModelProperty(value = "地址")
    private String addr;

    @ApiModelProperty(value = "任教班级")
    private String classNames;

    @ApiModelProperty(value = "入职日期")
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date enterDate;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "任教列表")
    private List<TeacherCourseVo> teacherCourseVoList;

    @ApiModelProperty(value = "是否已经上传人脸")
    private Boolean hasUploadFace = false;

    @ApiModelProperty(value = "用户类型名称")
    private String userTypeName;

    public String getUserTypeName() {
        if (userType == null) {
            return null;
        }
        return UserTypeEnum.getDesc(this.userType.intValue());
    }

    @ApiModelProperty(value = "账号ID")
    private Long accountId;

    @ApiModelProperty(value = "用户编号")
    private String userCode;

    @ApiModelProperty(value = "学校名称")
    private String orgName;

    @ApiModelProperty(value = "卡号")
    private String cardNo;

    @ApiModelProperty(value = "录入时间")
    private String createTime;
}
